home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 23
/
Aminet 23 (1998)(GTI - Schatztruhe)[!][Feb 1998].iso
/
Aminet
/
text
/
edit
/
BlacksEditor.lha
/
BlacksEditor
/
Rexx
/
SaveDesktop.bed
< prev
next >
Wrap
Text File
|
1997-12-03
|
1KB
|
70 lines
/*
** $VER: SaveDesktop.bed 1.0 (02.01.96)
**
** Saves the layout of the desktop
** The parameter QUIT also quit the program
**
** Written by Marco Negri
*/
OPTIONS RESULTS
OPTIONS FAILAT 11
PARSE ARG name quit
quit = UPPER(quit)
IF name = "" THEN DO
RequestFile SAVEMODE 'TITLE "Select File to Save as Layout"' 'PATTERN "#?.layout"' 'BED:Support/'
IF RC ~= 0 THEN EXIT
name = RESULT
END
IF RIGHT(name,7) ~= ".layout" THEN name = name || ".layout"
ADDRESS BED
GetDocuments
docs = RESULT
i = 0
IF Open(save,name,WRITE) THEN DO
DO WHILE docs ~= ""
PARSE VAR docs '"'.'"' port docs
ADDRESS VALUE port
GetFilePath
WriteLn(save,RESULT)
GetWindowInfo
PARSE VAR RESULT icon x1 y1 w1 h1 .
IconifyWindow TOGGLE
GetWindowInfo
PARSE VAR RESULT . x2 y2 w2 h2 .
IconifyWindow TOGGLE
IF icon = ON THEN DO
str = x2 || '/' || y2 || '/' || w2 || '/' || h2 || '/' || x1 || '/' || y1 || '/ICONIFIED'
END; ELSE DO
str = x1 || '/' || y1 || '/' || w1 || '/' || h1 || '/' || x2 || '/' || y2
END
WriteLn(save,str)
GetCursorPos
str = WORD(RESULT,1) WORD(RESULT,2)
WriteLn(save,str)
WriteLn(save,"")
IF quit='QUIT' THEN CloseDoc
i = i+1
END
Close(save)
END